
public class NodoHashAVL extends Nodo
{
    private AVL tree;
    
    public NodoHashAVL(int value)
    {
        super(value);
        this.tree = new AVL();
    }

    @Override
    public void insert(int key)
    {
        if(key<this.value)
        {
            int aux = value;
            value = key;
            key = aux;
        }
        tree.insert(key);
    }

    @Override
    public boolean search(int key)
    {
        if(value == key){
            return true;
        }
        else
            return tree.search(key);
    }

    @Override
    public void imprimir()
    {
        System.out.print(" "+value);
        tree.imprimir();
    }
}
